1. Field of Invention
This invention is directed to a method and apparatus for translating an arc definition into a series of conic curve definitions.
2. Description of Related Art
Figures or drawings are often produced using well-known software applications, such as MICROSOFT PAINT® and POWERPOINT.® Such drawings or figures may be represented inside the computer as image elements such as curves or geometrical shapes. The description of the image may be emitted by a page description language (PDL) printer driver, which translates the computer specific image elements into their PDL equivalents, as defined by a page description language specification. The page description language print file that is produced specifies the arrangement of a page to be printed through commands that the printer carries out when the file is transmitted to it from the computer. Printer Control Language (PCL) and POSTSCRIPT are the two commonly used PDLs.
PDLs describe image elements as geometrical objects, such as lines, arcs, and the like. PDLs define image elements independently of the specifics of the printer hardware, so that the overall appearance of a page is consistent regardless of the specific printer used, though the quality of each graphic element may vary as each printer renders them to the best of its ability. For example, the printer is sent a command to draw a square or a character of a certain size in a specific location, rather than a computer transmitting to the printer the actual bits that make up the image of the square or the character.
The printer itself (rather than the user's computer) processes the page description language commands it finds in the print file through PDL decomposers. PDL decomposers are software modules responsible for interpreting the PDL specific commands into input usable by the imaging software module all the decomposers share, known as a common imager. Having all the decomposers use a common imaging package insures that the same page described in different PDLs will come out looking the same, regardless of the PDL used. It is very important that the user's choice of PDL does not result in different colors being used, or lines that are thicker or thinner than another PDL would produce.
A common image element occurring in figures or drawings are arcs. An arc can be defined by a bounding box encompassing an ellipse and two vectors that radiate outward from the center of the ellipse. The bounding box is the smallest rectangular box that fully encloses all of the points on the ellipse. An intersection of the first vector and the ellipse define a starting point of the arc, and an intersection of the second vector and the ellipse define an ending point of the arc. This arc can encompass anywhere from 0 to 360 degrees of the underlying ellipse. Using this format, an arc is fully defined by four pairs of coordinate values and a rotation indicator, making it the most concise format for the purpose of transmitting an arc definition from computer to the printer.
In order for an imager to render graphic elements onto paper, the imager must have the graphic elements defined in terms of mathematical formulas that can be used to determine whether each graphic element intersects, obscures, or otherwise effects other elements. An imager could internally represent a simple arc definition, such as described above, as a long series of line segment formulas when rendering it for printing by the hardware. However, to improve rendering speed, some imagers internally represent graphic elements in terms of not just cursor movements and line segments, but also more complex formulas such as Bezier curves and conic curves. A conic curve, for example, can be used by an imager to represent any arc having an arc length of less than 180 degrees. Thus, the use of a single conic curve formula can represent an arc that would require many line segment formulas, greatly reducing the number of calculations needed to determine whether another graphic element intersects or overlaps the arc in question. Arcs of 180 degrees or more require two or more conic curve formulas to represent them.
Accordingly, there is a need for a method and apparatus for translating an arc defined by four pair of spatial coordinates into a series of conic curve definitions, from which the imager derives conic curve formulas for its internal representation of the arc, and thereby significantly improving the efficiency of the rendering process beyond what more simplistic internal representations of the arc would allow.